package com.snow.dao;

import com.snow.pojo.model.UserDomain;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @Description:
 * @author: snow
 * @Date: 2020-01-16
 **/
@Mapper
public interface UserDao {
    /**
     * 更新用户信息
     * @param userDomain
     * @return
     */
    int updateUserInfo(UserDomain userDomain);

    /**
     *根据主键编号获得用户信息
     * @param uid
     * @return
     */
    UserDomain getUserInfoById(int uid);

    /**
     *根据用户名和密码获取用户信息
     * @param username
     * @param password
     * @return
     */
    UserDomain getUserByCond(@Param("username") String username,@Param("password") String password);

    /**
     * 根据用户名得到用户
     * @param username
     * @return
     */
    UserDomain getUserByUsername(String username);

    /**
     * 注册-添加用户
     * @param userDomain
     */
    int addUser(UserDomain userDomain);
}
